package thread;

public class DeadThreadDemo extends Thread{
	public DeadThreadDemo(String name){
		super(name);
		
	}
	public void run(){
		System.out.println(this.getName()+"线程开始运行……");
		for(int i = 1;i<4;i++){
			System.out.println(this.getName()+"运行了"+i+"次");
		}
		System.out.println(this.getName()+"运行完毕");
	}
	public static void main(String[] args) {
		DeadThreadDemo dtd = new DeadThreadDemo("1#");
		
		dtd.start();
		dtd.start();//再次运行报错。因为线程已经死亡。
		System.out.println(dtd.isAlive());
	}
}
